package org.example.admin.service.impl;

import org.example.admin.entity.Shop;
import org.example.admin.mapper.ShopMapper;
import org.example.admin.service.ShopService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ShopServiceImpl implements ShopService {

    @Resource
    private ShopMapper shopMapper;

    public int insertShop(String dishname,int dishprice,int userid,int number){return shopMapper.insertShop(dishname,dishprice,userid,number);}

    public List<Shop> selectShopByUserId(int userId){return shopMapper.selectShopByUserId(userId);}

    public int updateNumber(int number, int shopid){return shopMapper.updateNumber(number, shopid);}

    public Shop selectShopByShopId(int shopid){return shopMapper.selectShopByShopId(shopid);}

    public int deleteShopByShopId(int shopid){return shopMapper.deleteShopByShopId(shopid);}
}
